//------------------------------------------------------------------------------
//此代码由工具生成
//请使用partial类进行扩展,避免修改被覆盖
//------------------------------------------------------------------------------
using System;
using XKPlatform.DataModels;
using System.Collections.Generic;
using System.Text;
using XKPlatform.Common;
using XKPlatform.DataModels.Dao.BaseDao;
using System.Linq.Expressions;
using XKPlatform.DataModels.Dao.BaseEntity;
using FreeSql;

namespace XKPlatform
{
    public class SysUserService : BaseFreeSqlDao<SysUser>, ISysUserService
    {
        public bool AddModel(SysUser model)
        {
            return InsertAffrows(model) > 0;
        }

        public bool BatchSave(List<SysUser> models)
        {
            return BatchInsert(models) > 0;
        }

        public (List<SysUser> list, long count) GetList(Expression<Func<SysUser, bool>> where, List<SortInfo<SysUser, object>> orderbys = null, PageInfo pageInfo = null)
        {
            return Query(where, orderbys, pageInfo);
        }

        public (List<SysUser> list, long count) GetListByTbName(Expression<Func<SysUser, bool>> where, string tbName, List<SortInfo<SysUser, object>> orderbys = null, PageInfo pageInfo = null)
        {
            return Query(where, tbName, orderbys, pageInfo);
        }

        public SysUser GetModel(Expression<Func<SysUser, bool>> where)
        {
            return GetByOne(where);
        }

        public IUpdate<SysUser> UpdateBySets(Expression<Func<SysUser, bool>> where)
        {
            throw new NotImplementedException();
        }

        public bool UpdateModel(SysUser model, Expression<Func<SysUser, bool>> where, Expression<Func<SysUser, object>> IgnoreLmbad = null)
        {
            return Update(model, where, IgnoreLmbad);
        }

    }
}
